<?php
/**
 * $Id: ComboHelper.class.php 12 2010-07-06 04:34:57Z corlatti $
 * @author Claudio Corlatti
 *
 */
class ComboHelper {
	
	function __construct() {
	}
	
	function getEnabledBanks(){
		$result = null;
		try {
			$dao = Doctrine::getTable('Mbanco');
			
			$q = $dao->getBanks($onlyEnabledOnes=true, null);
			
			$result = $q->fetchArray();
		} catch (Exception $e){
			throw $e;
		}
		return $result;
	}
	
	function getEnabledCurrencies(){
		$result = null;
		try {
			$dao = Doctrine::getTable('Mtipomoneda');
			
			$q = $dao->getAll($onlyEnabledOnes=true, null);
			
			$result = $q->fetchArray();
		} catch (Exception $e){
			throw $e;
		}
		return $result;
	}
	
	function getEnabledClients($tipo){
		$result = null;
		try {
			$dao = Doctrine::getTable('Mproveedor');
			$onlyEnabledOnes=true;
			$q = $dao->getAll($tipo, $onlyEnabledOnes, null);
			
			$result = $q->fetchArray();
		} catch (Exception $e){
			throw $e;
		}
		return $result;		
	}
		
}

?>